import request from '@/utils/request'

// 查询压力传感器设备列表
export function listPressureSensorClient(query) {
  return request({
    url: '/device/pressureSensorClient/list',
    method: 'get',
    params: query
  })
}

// 查询压力传感器设备详细
export function getPressureSensorClient(id) {
  return request({
    url: '/device/pressureSensorClient/' + id,
    method: 'get'
  })
}

// 新增压力传感器设备
export function addPressureSensorClient(data) {
  return request({
    url: '/device/pressureSensorClient',
    method: 'post',
    data: data
  })
}

// 修改压力传感器设备
export function updatePressureSensorClient(data) {
  return request({
    url: '/device/pressureSensorClient',
    method: 'put',
    data: data
  })
}

// 删除压力传感器设备
export function delPressureSensorClient(id) {
  return request({
    url: '/device/pressureSensorClient/' + id,
    method: 'delete'
  })
}

export function settingParams(data) {
  return request({
    url: '/device/pressureSensorClient/setParam/' + data.pkey + '/' + data.sn,
    method: 'post',
    data: data
  })
}


// 查询压力传感器设备参数详细
export function getPressureSensorParamBySn(sn) {
  return request({
    url: '/device/pressureSensorClient/pressureSensorParamBySn/' + sn,
    method: 'get'
  })
}


// 发布地震预警演练
export function pressureSensorEarthquakeDrill(sn) {
  return request({
    url: '/device/pressureSensorClient/pressureSensorEarthquakeDrill/' + sn,
    method: 'get'
  })
}
